package com.dragon.modules.yuegou.query.busd;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.busd.OperationDataEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
/**
 * 商圈运营数据表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-12-27 15:08:16
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class OperationDataQuery extends OperationDataEntity implements Query<OperationDataEntity> {


    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈id查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 商圈名称查询条件 */
	@JsonUnwrapped(prefix = "busdName")
	private Condition<String> busdNameCondition;

    /** 开门营业率查询条件 */
	@JsonUnwrapped(prefix = "openRate")
	private Condition<BigDecimal> openRateCondition;

    /** 客流量查询条件 */
	@JsonUnwrapped(prefix = "customerFlow")
	private Condition<Integer> customerFlowCondition;

    /** 统计月份查询条件 */
	@JsonUnwrapped(prefix = "month")
	private Condition<String> monthCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public OperationDataQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public OperationDataQuery(OperationDataEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public OperationDataQuery(OperationDataQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.busdNameCondition != null) {
			this.busdNameCondition = other.busdNameCondition.copy();
		}
		if(other.openRateCondition != null) {
			this.openRateCondition = other.openRateCondition.copy();
		}
		if(other.customerFlowCondition != null) {
			this.customerFlowCondition = other.customerFlowCondition.copy();
		}
		if(other.monthCondition != null) {
			this.monthCondition = other.monthCondition.copy();
		}
	}

	@Override
	public QueryWrapper<OperationDataEntity> toQueryWrapper() {
		QueryWrapper<OperationDataEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (busdNameCondition != null) {
			busdNameCondition.toWrapper(wrapper, COL_BUSD_NAME);
		}
		if (openRateCondition != null) {
			openRateCondition.toWrapper(wrapper, COL_OPEN_RATE);
		}
		if (customerFlowCondition != null) {
			customerFlowCondition.toWrapper(wrapper, COL_CUSTOMER_FLOW);
		}
		if (monthCondition != null) {
			monthCondition.toWrapper(wrapper, COL_MONTH);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈id查询条件
	 * 
	 * @return busdIdCondition 商圈id查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈id查询条件
	 * 
	 * @return busdIdCondition 商圈id查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈id查询条件
	 * 
	 * @param busdIdCondition 商圈id查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回商圈名称查询条件
	 * 
	 * @return busdNameCondition 商圈名称查询条件
	 */
	public Condition<String> busdName() {
		this.busdNameCondition = new Condition<>();
		return this.busdNameCondition;
	}
	
	/**
	 * 获取商圈名称查询条件
	 * 
	 * @return busdNameCondition 商圈名称查询条件
	 */
	public Condition<String> getBusdNameCondition() {
		return busdNameCondition;
	}

	/**
	 * 设置商圈名称查询条件
	 * 
	 * @param busdNameCondition 商圈名称查询条件
	 */
	public void setBusdNameCondition(Condition<String> busdNameCondition) {
		this.busdNameCondition = busdNameCondition;
	}

	/**
	 * 构造并返回开门营业率查询条件
	 * 
	 * @return openRateCondition 开门营业率查询条件
	 */
	public Condition<BigDecimal> openRate() {
		this.openRateCondition = new Condition<>();
		return this.openRateCondition;
	}
	
	/**
	 * 获取开门营业率查询条件
	 * 
	 * @return openRateCondition 开门营业率查询条件
	 */
	public Condition<BigDecimal> getOpenRateCondition() {
		return openRateCondition;
	}

	/**
	 * 设置开门营业率查询条件
	 * 
	 * @param openRateCondition 开门营业率查询条件
	 */
	public void setOpenRateCondition(Condition<BigDecimal> openRateCondition) {
		this.openRateCondition = openRateCondition;
	}

	/**
	 * 构造并返回客流量查询条件
	 * 
	 * @return customerFlowCondition 客流量查询条件
	 */
	public Condition<Integer> customerFlow() {
		this.customerFlowCondition = new Condition<>();
		return this.customerFlowCondition;
	}
	
	/**
	 * 获取客流量查询条件
	 * 
	 * @return customerFlowCondition 客流量查询条件
	 */
	public Condition<Integer> getCustomerFlowCondition() {
		return customerFlowCondition;
	}

	/**
	 * 设置客流量查询条件
	 * 
	 * @param customerFlowCondition 客流量查询条件
	 */
	public void setCustomerFlowCondition(Condition<Integer> customerFlowCondition) {
		this.customerFlowCondition = customerFlowCondition;
	}

	/**
	 * 构造并返回统计月份查询条件
	 * 
	 * @return monthCondition 统计月份查询条件
	 */
	public Condition<String> month() {
		this.monthCondition = new Condition<>();
		return this.monthCondition;
	}
	
	/**
	 * 获取统计月份查询条件
	 * 
	 * @return monthCondition 统计月份查询条件
	 */
	public Condition<String> getMonthCondition() {
		return monthCondition;
	}

	/**
	 * 设置统计月份查询条件
	 * 
	 * @param monthCondition 统计月份查询条件
	 */
	public void setMonthCondition(Condition<String> monthCondition) {
		this.monthCondition = monthCondition;
	}

}
